
<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

    <div class="layui-form-item">
        <label class="layui-form-label">客户端</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <select name="role" lay-verify="required">
                    <option value="">选择客户端</option>
                    {{# layui.each([
                        {role:'user',title:'用户端'},
                        {role:'logistics',title:'物流端'}
                    ],function(index,item){ }}
                    <option value="{{ item.role }}" {{ d.params.role == item.role ? 'selected' : '' }}>{{ item.title }}</option>
                    {{# }); }}
                </select>
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">版本号</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="version" value="{{d.params.version || ''}}" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">版本描述</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <textarea name="desc" class="layui-textarea">{{ d.params.desc || ''}}</textarea>
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">设备类型</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="radio" name="type" value="android" title="安卓" {{ Object.keys(d.params).length === 0 || d.params.type == 'andriod' ? 'checked': '' }}>
                <input type="radio" name="type" value="apple" title="苹果" {{ d.params.type == 'apple' ? 'checked':'' }}>
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">安装文件</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="file" value="{{ d.params.file || '' }}" id="form-file" lay-verify="required" placeholder="文件地址" autocomplete="off" class="layui-input">
            </script>
        </div>
        <div class="layui-input-inline layui-btn-container" style="width: auto;">
            <button class="layui-btn layui-btn-primary" id="form-upload" lay-data="{url: '/api/admin/home/upload', accept: 'file'}">选择文件</button>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">下载地址</label>
        <div class="layui-input-block">
            <script type="text/html" template>
                <input type="text" name="url" value="{{d.params.url || ''}}" class="layui-input" id="form-url">
            </script>
        </div>
    </div>
    <script type="text/html" template>
        <input name="id" value="{{d.params.id || 0}}" type="hidden">
    </script>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" value="确认" class="layui-btn">
        </div>
    </div>

</div>
